﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Commander.Classes;
using Commander.Views;

namespace Commander.Classes
{
    class MoreWorkDir
    {
        public static void DeletesFiles(string path,System.Collections.IList str)
        {
            string tmp;
            foreach (IOView lst in str)
            {
                tmp = path;
                if (lst.Size == "<Папка>")
                {
                    tmp += lst.Name+@"\";
                    WorkDir.DeleteDir(tmp);
                }
                else
                {
                    tmp += lst.Name + "." + lst.Type;
                    WorkDir.DeleteFile(tmp);
                }
            }
        }
    }
}
